package com.pcbly.web.business.group;

import java.util.List;

import com.pcbly.web.bean.system.GroupBean;
import com.pcbly.web.business.BaseServiceImp; 
import com.pcbly.web.persistence.group.GroupDao;


public class GroupServiceImp extends BaseServiceImp<GroupBean> implements
		GroupService {

	/**
	 * 
	 */
	private static final long serialVersionUID = -1533116271039675318L;
	private GroupDao groupDao;
	
	public void setGroupDao(GroupDao groupDao) {
		this.groupDao = groupDao;
	}
	public GroupServiceImp(){
		
	}
	@Override
	public void deleteGroupBeanById(String id) throws Exception {
		// TODO Auto-generated method stub
		groupDao.removeById(id);
	}

	@Override
	public List<GroupBean> findGroupBeans() throws Exception {
		// TODO Auto-generated method stub
		return groupDao.getAll();
	}

	@Override
	public void saveGroupBean(GroupBean bean) throws Exception {
		// TODO Auto-generated method stub
		groupDao.saveGroupBean(bean);
	}

	@Override
	public void updateGroupBean(GroupBean bean) throws Exception {
		// TODO Auto-generated method stub
		groupDao.saveObject(bean);
	}
	@Override
	public GroupBean getGroupBeanById(String id) throws Exception {
		// TODO Auto-generated method stub
		return groupDao.get(id);
	}

}
